package com.kyivmohyla.kma2.client;


import com.google.gwt.user.client.rpc.AsyncCallback;
import com.kyivmohyla.kma2.shared.model.*;

import java.util.List;
import java.util.Map;

public interface UserServiceAsync {

    void getOrdersByState(int[] arrayOfStates, AsyncCallback<List<UIOrder>> async);

    void getOrdersByStateAndDate(int[] states, String date, AsyncCallback<List<UIOrder>> async);

    void getOrdersByStateAndDateAndPosition(int[] states, String date, int position, AsyncCallback<List<UIOrder>> async);

    void getCustomerAllCustomers(AsyncCallback<List<UICustomer>> async);

    void getStaffAllStaffs(AsyncCallback<List<UIStaff>> async);

    void getEquipmentAllEquipment(AsyncCallback<List<UIEquipment>> async);

    void getHistoryAllHistory(AsyncCallback<List<UIHistory>> async);

    void getOrderAllOrder(AsyncCallback<List<UIOrder>> async);

    void getOrderServEquipAllOrderServEquip(AsyncCallback<List<UIOrderServEquip>> async);

    void getPositionAllPosition(AsyncCallback<List<UIPosition>> async);

    void getRefsAllRefs(AsyncCallback<List<UIRefs>> async);

    void getServiceAllService(AsyncCallback<List<UIService>> async);

    void getStateAllState(AsyncCallback<List<UIState>> async);

    void addNewObjectToReferenceBook(UIEquipment obj, AsyncCallback<Void> async);

    void addNewObjectToReferenceBook(UIService obj, AsyncCallback<Void> async);

    void addCustomer(UICustomer customer, AsyncCallback<Void> async);

    void addOrder(UIOrder order, AsyncCallback<Void> async);

    void changePassword(String email, AsyncCallback<Void> async);

    void getCustomerById(int id, AsyncCallback<UICustomer> async);

    void getCustomerWithMaxId(AsyncCallback<UICustomer> async);

    void getOrderWithMaxId(AsyncCallback<UIOrder> async);

    void updateCustomer(UICustomer customer, AsyncCallback<Void> async);

    void updateOrder(UIOrder order, AsyncCallback<Void> async);

    void deleteObjectsFromEquipmentRB(List<UIEquipment> objs, AsyncCallback<Void> async);

    void deleteObjectsFromServiceRB(List<UIService> objs, AsyncCallback<Void> async);

    void deleteCustomer(UICustomer customer, AsyncCallback<Void> async);

    void deleteOrder(UIOrder order, AsyncCallback<Void> async);

    void getAllEngineers(AsyncCallback<List<UIStaff>> async);

    void getServiceByOrderId(int id, AsyncCallback<List<UIService>> async);

    void getHistoryByOrderId(int id, AsyncCallback<List<UIHistory>> async);

    void addHistory(UIHistory history, AsyncCallback<Void> async);

    void addOrderServEquipList(List<UIOrderServEquip> orderServEquipList, AsyncCallback<Void> async);

    void deleteOrderServEquipList(List<UIOrderServEquip> orderServEquipList, AsyncCallback<Void> async);

    void deleteChildEquipmentList(List<UIEquipment> equipments, AsyncCallback<List<UIEquipment>> async);

    void deleteParentEquipmentList(List<UIEquipment> equipments, AsyncCallback<List<UIEquipment>> async);

    void deleteChildServiceList(List<UIService> services, AsyncCallback<List<UIService>> async);

    void deleteParentServiceList(List<UIService> services, AsyncCallback<List<UIService>> async);

    void validateOrderSchedule(List<UIOrder> orders, AsyncCallback<Map<UIOrder, Boolean>> async);

    void updateOrderList(List<UIOrder> orders, AsyncCallback<Void> async);

    void getEquipmentByServicesList(List<UIService> services, AsyncCallback<List<UIEquipment>> async);

    void getEquipmentById(int id, AsyncCallback<UIEquipment> async);

    void getServiceById(int id, AsyncCallback<UIService> async);

    void addRefsList(List<UIRefs> refsList, AsyncCallback<Void> async);

    void deleteRefsList(List<UIRefs> refsList, AsyncCallback<Void> async);

    void getEquipmentByOrderId(int id, AsyncCallback<List<UIEquipment>> async);

    void sendMail(String recipient, String subject, String message, AsyncCallback<Void> async);

    void updateEquipment(UIEquipment equipment, AsyncCallback<Void> async);

    void updateService(UIService service, AsyncCallback<Void> async);

    void deleteOrderServEquipByOrderId(int id, AsyncCallback<Void> async);
}
